package com.lanchetech.dao;

import com.lanchetech.bean.request.PageReq;import com.lanchetech.entity.Article;
import org.apache.ibatis.annotations.Mapper;import org.apache.ibatis.annotations.Param;import java.util.List;

@Mapper
public interface ArticleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Article record);

    int insertSelective(Article record);

    Article selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Article record);

    int updateByPrimaryKey(Article record);

    List<Article> findAllByArticle(PageReq req);

    List<Article> findFiveByCatalog(@Param("catalog") String catalog);

    int updateEffectById(@Param("updatedEffect") String updatedEffect, @Param("id") Long id);

    List<Article> findAllByEffectIsNotNull();

    Article findOneByEffect(@Param("effect") String effect);

    List<Article> findAllByCatalogOrderByTopDesc(@Param("catalog")String catalog);


}